home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / applications / wp / hwgpostbeta5.lha / HWGPOST / init.ps < prev    next >
Encoding:
Text File  |  1994-11-13  |  2.6 KB  |  119 lines

  1. %! HWGPOST >= V22.25 initialisation file
  2. %
  3. % $Id: init.ps,v 2.15 1994/11/13 14:41:34 heinz Exp $
  4. %
  5. % HWGPOST ©1993,1994 Heinz Wrobel, for Joan Thuesen
  6. %
  7. % Based loosely on Post V1.7 (C) Adrian Aylward 1989, 1991
  8. %
  9. % You may freely copy, use, and modify this file
  10. %
  11. % This file should be run before most programs
  12.  
  13. % A dummy status dictionary
  14. false setglobal
  15. statusdict begin
  16. /waittimeout 0 def
  17. /setdefaulttimeouts {pop pop pop} bind def
  18. end
  19.  
  20. % We need global VM for modifications to systemdict!
  21. currentglobal true setglobal
  22. systemdict begin
  23.  
  24. % Ignore CTRL/D, CTRL/L, and simple CRs
  25.  
  26. <04> cvn {} def
  27. <0c> cvn {} def
  28. <0d> cvn {} def
  29.  
  30. % Dummies for ugly PostScript code
  31.  
  32. /setjobtimeout { pop } bind def
  33. /letter {} def
  34.  
  35. % Ok, lets return to the previous vm mode and make the systemdict readonly
  36. end
  37. systemdict readonly pop
  38. setglobal
  39.  
  40. %
  41. % We try to register all our resources on disk now. This speeds up
  42. % access.
  43. %
  44. % We look for the file "HWGPOSTResources" and execute it if it is available
  45. % If not, we check for it as "POST:HWGPOSTResources", too.
  46. % If this fails again, we can't do anything reasonable about it, so we don't.
  47. %
  48. (HWGPOSTResources) dup status
  49. {
  50.     pop pop pop pop true
  51. }
  52. {
  53.     pop
  54.     (%POST%HWGPOSTResources) dup status
  55.     {
  56.         pop pop pop pop true
  57.     }
  58.     {
  59.         pop false
  60.     }
  61.     ifelse
  62. }
  63. ifelse
  64. {
  65.     currentglobal exch true setglobal
  66.     run
  67.     setglobal
  68. }
  69. if
  70.  
  71. %
  72. % To keep compatibility with the old post.library I need to have
  73. % the renderband commands available. I don't want them to "clutter"
  74. % the PS name space by default, so they are built in as "@currentband"
  75. % and "@setband" and need to be redefined for "old" SW.
  76. %
  77. % I encourage any user of HWGPOST to use the "@" names for these operators
  78. % as I might drop support for the old names in init.ps in the future.
  79. %
  80. /currentband /@currentband load def
  81. /setband /@setband load def
  82.  
  83. %
  84. % Even more ugly compatibility magic. Most people won't need this. Those who
  85. % do should refer to HWGPOSTlib.doc and hopefully find a way to avoid it.
  86. %
  87. systemdict /@callextfunc known {/callextfunc /@callextfunc load def} if
  88.  
  89. %
  90. % Due to many requests the default font handling of stone age post is
  91. % back in disguise. If you don't want it, just throw out the definitions
  92. % below.
  93.  
  94. % Our DefaultFont prints out big dots ...
  95. %
  96. /@DefaultFont
  97. <<
  98. /FontName /DummyFont
  99. /FontMatrix [0.001 0 0 0.001 0 0]
  100. /FontType 3
  101. /FontBBox [0 -300 500 700]
  102. /Encoding StandardEncoding
  103. /BuildChar
  104. { pop pop
  105.   500 0 50 0 450 400 setcachedevice
  106.   250 200 200 0 360 arc fill
  107. } bind
  108. /Painttype 0
  109. >>
  110. definefont pop
  111.  
  112. %
  113. % Heavy magic to make the font lookup mechanism respect your choice of
  114. % a default font.
  115. %
  116. /@DefaultFontName /@DefaultFont def
  117.  
  118. % EOT
  119.